#pragma once
#ifndef _STROKE_H
#define _STROKE_H

#include "Macros.h"

#define MAX_LENGHT_STROKE 1000
#define K 20

struct Point2D
{
	float x, y;
	enum PEN_TYPE {PEN_DOWN = 0, PEN_MOVE, PEN_UP };
	PEN_TYPE m_penType;
};

class Stroke
{
protected:
	Point2D m_arrayPoint[MAX_LENGHT_STROKE];
	int n;
	
public:
	Stroke(): n(0){}
	void Init();
	void ReadFile(char* strFilePath);
	float std(bool isX_Or_Y);
	float MinX();
	float MinY();
	void Normalize();
	void ReSampleLinear(float d_len, int numOfVec); //d_len: distance follow Ox
	float* featureExtraction(int numOfVec);
	bool AddMouseDown();
	bool AddMouseMove(int x, int y);
	bool AddMouseUp();
	void PrintPoint();
};


#endif//_STROKE_H